<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Session_Controller</title>
<link href="../css/ea.css" rel="stylesheet" type="text/css" />
<script>
function initPage(src) {
	if(parent==this&&(this.location+"").indexOf('EARoot')!=-1)
		document.location=(this.location+"").substring(0,(this.location+"").indexOf('EARoot'))+"index"+(this.location+"").substring((this.location+"").lastIndexOf('.'))+"?goto="+((this.location+"").substring((this.location+"").indexOf('EARoot')+7,(this.location+"").lastIndexOf('.')).replace(/\//g,':').replace(/EA/g,""));
	else
		parent.initPage(src);
}
</script>
</head>
<body onload="initPage(this);" class="Content">
<div class="pageHeader"></div>
<div class="PageBody">
	<span class="ObjectTitle">Session_Controller  : public   class</span>
	<table border="0" cellpadding="0" cellspacing="0" class="ObjectDetails">
		<tr>
			<td width="15%" class="ObjectDetailsTopic">Created:</td>
			<td width="85%" class="ObjectDetailsValue">2/9/2010 9:05:23 PM</td>
		</tr>
		<tr>
			<td class="ObjectDetailsTopic">Modified:</td>
			<td class="ObjectDetailsValue">2/15/2010 8:00:38 PM</td>
		</tr>
		<tr style="height: 10px"><td colspan="2"></td></tr>
		<tr>
			<td class="ObjectDetailsTopic"><img src="../images/plus03.gif" align="absmiddle" id="proj" onclick="parent.toggleData(this.id)" />Project:</td>
			<td class="ObjectDetailsValue"></td>
		</tr>
		<tr id="proj00" style="display: none;">
			<td class="ObjectDetailsTopic" style="padding-left: 18px;">Author:</td>
			<td class="ObjectDetailsValue">Seba</td>
		</tr>
		<tr id="proj01" style="display: none;">
			<td class="ObjectDetailsTopic" style="padding-left: 18px;">Version:</td>
			<td class="ObjectDetailsValue">1.0</td>
		</tr>
		<tr id="proj02" style="display: none;">
			<td class="ObjectDetailsTopic" style="padding-left: 18px;">Phase:</td>
			<td class="ObjectDetailsValue">1.0</td>
		</tr>
		<tr id="proj03" style="display: none;">
			<td class="ObjectDetailsTopic" style="padding-left: 18px;">Status:</td>
			<td class="ObjectDetailsValue">Proposed</td>
		</tr>
		<tr id="proj04" style="display: none;">
			<td class="ObjectDetailsTopic" style="padding-left: 18px;">Complexity:</td>
			<td class="ObjectDetailsValue">Easy</td>
		</tr>
		<tr>
			<td class="ObjectDetailsTopic"><img src="../images/plus03.gif" align="absmiddle" id="adv" onclick="parent.toggleData(this.id)" />Advanced:</td>
			<td class="ObjectDetailsValue"></td>
		</tr>
		<tr id="adv00" style="display: none;">
			<td class="ObjectDetailsTopic" style="padding-left: 18px;">UUID:</td>
			<td class="ObjectDetailsValue">{3CBD312A-DFEB-4e54-8409-EAC29EC4F866}</td>
		</tr>
		<tr id="adv01" style="display: none;">
			<td class="ObjectDetailsTopic" style="padding-left: 18px;">Appears In:</td>
			<td class="ObjectDetailsValue"><a href="EA1.htm">Controller Class Diagram</a></td>
		</tr>
	</table>
	<div class="ObjectDetailsNotes">&lt;p&gt;El controlador de sesiones va a realizar las siguientes tareas:&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;- Iniciar / Comprobar / Cerrar las sesiones de usuario&lt;br /&gt;&lt;/p&gt;&lt;p&gt;- Registrar usuarios nuevos&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;(mas en la etapa 2)&lt;br /&gt;&lt;/p&gt;</div>

	<div class="TableGroup" id="TableGroup">
		<ul class="ItemTitle">
			<li onClick="parent.toggleItem('Operations');" id="OperationsTitle">Operations</li>
			<li onClick="parent.toggleItem('Links');" id="LinksTitle">Other Links</li>
		</ul>
<div class="ItemBody" id="OperationsTable">
	<table border="0" cellspacing="0" cellpadding="0" class="Table">
		<tr>
			<td width="100%" class="TableHeading">Operation</td>
		</tr>
						<tr>
				<td width="100%" class="TableRow">
					<i>public</i><br />
					<strong>addUser</strong>(<br />
					<a href="#" onclick="parent.toggleData('param{042098E3-88AE-44ea-AA43-A95178498647}')" style="text-decoration: none; color: #000000;"><img src="../images/plus03.gif" align="absmiddle" id="param{042098E3-88AE-44ea-AA43-A95178498647}" border="0" />userData: var</a>, 
					<table border="0" cellspacing="0" cellpadding="0" class="Table" style="padding: 4px 18px;">
						<tr id="param{042098E3-88AE-44ea-AA43-A95178498647}00" style="display: none;">
							<td width="50"><strong>Default:</strong></td>
							<td></td>
						</tr>
						<tr id="param{042098E3-88AE-44ea-AA43-A95178498647}01" style="display: none;">
							<td width="50"><strong>Kind:</strong></td>
							<td>in</td>
						</tr>
						<tr id="param{042098E3-88AE-44ea-AA43-A95178498647}02" style="display: none;">
							<td width="50"><strong>Stereotype: </strong></td>
							<td></td>
						</tr>
						<tr id="param{042098E3-88AE-44ea-AA43-A95178498647}03" style="display: none;">
							<td width="50"></td>
							<td><div class="ObjectDetailsNotes">Array con los siguientes datos:<br /><br />- name<br />- email<br />- password (encriptado con MD5)</div>
</td>
						</tr>
					</table>
):var
				</td>
			</tr>
			<tr>
				<td class="TableRowBottomDashed"  colspan="1">
					<div class="DetailsDivParent"><img src="../images/minus03.gif" align="absmiddle" id="DetailsImageOperations13" onclick="parent.toggleDiv('detailsDIVOperations13','DetailsImageOperations13')" />Details:
						<div id="detailsDIVOperations13" class="DetailsDiv" >
					<i>Sequential  </i>
					<table>
						<tr>
							<td valign = "top"><i></i><span style="margin-left: .7cm;"> </span></td>
							<td></td>
						</tr>
					</table>
					<div class="ObjectDetailsNotes"><table>
	<tr>
		<td valign="top">
			<i>Notes: </i><span style="margin-left: .4cm;"> </span>
		</td>
		<td>
			&lt;font color=&quot;#000000&quot;&gt;Una vez validados todos los datos, esta funcion agrega el usuario a la base de datos.&lt;/font&gt;&lt;br /&gt;&lt;br /&gt;Agrega el usuario a la base (Session_Model)&lt;br /&gt;Si no hubo problemas&lt;br /&gt;&nbsp;<WBR>&nbsp;<WBR>&nbsp;<WBR>&nbsp;<WBR> Envia mail de confirmacion (otro metodo)&lt;br /&gt;&nbsp;<WBR>&nbsp;<WBR>&nbsp;<WBR>&nbsp;<WBR> Redirecciona al perfil&lt;br /&gt;&nbsp;<WBR>&nbsp;<WBR>&nbsp;<WBR>&nbsp;<WBR> Retorna True&lt;br /&gt;Si hubo problemas&lt;br /&gt;&nbsp;<WBR>&nbsp;<WBR>&nbsp;<WBR>&nbsp;<WBR> Vuelve a la pagina de comprobacion&lt;br /&gt;&nbsp;<WBR>&nbsp;<WBR>&nbsp;<WBR>&nbsp;<WBR> Muestra codigos de error&lt;br /&gt;&nbsp;<WBR>&nbsp;<WBR>&nbsp;<WBR>&nbsp;<WBR> retorna False&lt;br /&gt;
		</td>
	</tr>
</table></div>
						
						</div>
					</div>
				</td>
			</tr>
			<tr>
				<td width="100%" class="TableRow">
					<i>public</i><br />
					<strong>destroySession</strong>(<br />
					<a href="#" onclick="parent.toggleData('param{A8DD3CC6-3BA2-4534-B9F0-B67DA03C1B58}')" style="text-decoration: none; color: #000000;"><img src="../images/plus03.gif" align="absmiddle" id="param{A8DD3CC6-3BA2-4534-B9F0-B67DA03C1B58}" border="0" />profileID: var</a>, 
					<table border="0" cellspacing="0" cellpadding="0" class="Table" style="padding: 4px 18px;">
						<tr id="param{A8DD3CC6-3BA2-4534-B9F0-B67DA03C1B58}00" style="display: none;">
							<td width="50"><strong>Default:</strong></td>
							<td></td>
						</tr>
						<tr id="param{A8DD3CC6-3BA2-4534-B9F0-B67DA03C1B58}01" style="display: none;">
							<td width="50"><strong>Kind:</strong></td>
							<td>in</td>
						</tr>
						<tr id="param{A8DD3CC6-3BA2-4534-B9F0-B67DA03C1B58}02" style="display: none;">
							<td width="50"><strong>Stereotype: </strong></td>
							<td></td>
						</tr>
						<tr id="param{A8DD3CC6-3BA2-4534-B9F0-B67DA03C1B58}03" style="display: none;">
							<td width="50"></td>
							<td><div class="ObjectDetailsNotes">Id del usuario cuya sesion hay que cerrar</div>
</td>
						</tr>
					</table>
):var
				</td>
			</tr>
			<tr>
				<td class="TableRowBottomDashed"  colspan="1">
					<div class="DetailsDivParent"><img src="../images/minus03.gif" align="absmiddle" id="DetailsImageOperations14" onclick="parent.toggleDiv('detailsDIVOperations14','DetailsImageOperations14')" />Details:
						<div id="detailsDIVOperations14" class="DetailsDiv" >
					<i>Sequential  </i>
					<table>
						<tr>
							<td valign = "top"><i></i><span style="margin-left: .7cm;"> </span></td>
							<td></td>
						</tr>
					</table>
					<div class="ObjectDetailsNotes"><table>
	<tr>
		<td valign="top">
			<i>Notes: </i><span style="margin-left: .4cm;"> </span>
		</td>
		<td>
			&lt;font color=&quot;#000000&quot;&gt;Cierra la sesion del usuario indicado por profileID y elimina todas las cookies.&lt;/font&gt;&lt;br /&gt;&lt;br /&gt;Comprueba que el usuario este logueado&lt;br /&gt;Elimina las cookies&lt;br /&gt;Destruye la sesion&lt;br /&gt;&lt;br /&gt;Retorna:&lt;br /&gt; - true = sin problemas&lt;br /&gt; - false = ocurrio algun problema
		</td>
	</tr>
</table></div>
						
						</div>
					</div>
				</td>
			</tr>
			<tr>
				<td width="100%" class="TableRow">
					<i>public</i><br />
					<strong>getSessionBar</strong>(<br />
					<a href="#" onclick="parent.toggleData('param{64A5F2BE-3A6F-4c9b-B436-24F7F0D214EB}')" style="text-decoration: none; color: #000000;"><img src="../images/plus03.gif" align="absmiddle" id="param{64A5F2BE-3A6F-4c9b-B436-24F7F0D214EB}" border="0" />return: var</a>, 
					<table border="0" cellspacing="0" cellpadding="0" class="Table" style="padding: 4px 18px;">
						<tr id="param{64A5F2BE-3A6F-4c9b-B436-24F7F0D214EB}00" style="display: none;">
							<td width="50"><strong>Default:</strong></td>
							<td></td>
						</tr>
						<tr id="param{64A5F2BE-3A6F-4c9b-B436-24F7F0D214EB}01" style="display: none;">
							<td width="50"><strong>Kind:</strong></td>
							<td>return</td>
						</tr>
						<tr id="param{64A5F2BE-3A6F-4c9b-B436-24F7F0D214EB}02" style="display: none;">
							<td width="50"><strong>Stereotype: </strong></td>
							<td></td>
						</tr>
						<tr id="param{64A5F2BE-3A6F-4c9b-B436-24F7F0D214EB}03" style="display: none;">
							<td width="50"></td>
							<td><div class="ObjectDetailsNotes">- el html de la session_bar</div>
</td>
						</tr>
					</table>
):var
				</td>
			</tr>
			<tr>
				<td class="TableRowBottomDashed"  colspan="1">
					<div class="DetailsDivParent"><img src="../images/minus03.gif" align="absmiddle" id="DetailsImageOperations15" onclick="parent.toggleDiv('detailsDIVOperations15','DetailsImageOperations15')" />Details:
						<div id="detailsDIVOperations15" class="DetailsDiv" >
					<i>Sequential  </i>
					<table>
						<tr>
							<td valign = "top"><i></i><span style="margin-left: .7cm;"> </span></td>
							<td></td>
						</tr>
					</table>
					<div class="ObjectDetailsNotes"><table>
	<tr>
		<td valign="top">
			<i>Notes: </i><span style="margin-left: .4cm;"> </span>
		</td>
		<td>
			Prepara la session_bar para que sea ubicada en cualquier vista.&lt;br /&gt;&lt;br /&gt;Formatear y retornar la session_bar&lt;br /&gt;- Datos de la session actual&lt;br /&gt;- Mensajes&lt;br /&gt;- Notificaciones (esto necesita un nuevo nombre jaja)&lt;br /&gt;
		</td>
	</tr>
</table></div>
						
						</div>
					</div>
				</td>
			</tr>
			<tr>
				<td width="100%" class="TableRow">
					<i>public</i><br />
					<strong>getSessionInfo</strong>():var
				</td>
			</tr>
			<tr>
				<td class="TableRowBottomDashed"  colspan="1">
					<div class="DetailsDivParent"><img src="../images/minus03.gif" align="absmiddle" id="DetailsImageOperations16" onclick="parent.toggleDiv('detailsDIVOperations16','DetailsImageOperations16')" />Details:
						<div id="detailsDIVOperations16" class="DetailsDiv" >
					<i>Sequential  </i>
					<table>
						<tr>
							<td valign = "top"><i></i><span style="margin-left: .7cm;"> </span></td>
							<td></td>
						</tr>
					</table>
					<div class="ObjectDetailsNotes"><table>
	<tr>
		<td valign="top">
			<i>Notes: </i><span style="margin-left: .4cm;"> </span>
		</td>
		<td>
			Retorna un array con los datos de la session&lt;br /&gt;
		</td>
	</tr>
</table></div>
						
						</div>
					</div>
				</td>
			</tr>
			<tr>
				<td width="100%" class="TableRow">
					<i>public</i><br />
					<strong>startSession</strong>(<br />
					<a href="#" onclick="parent.toggleData('param{4CAC8D6D-F6C7-4cda-8908-47721F74B3DC}')" style="text-decoration: none; color: #000000;"><img src="../images/plus03.gif" align="absmiddle" id="param{4CAC8D6D-F6C7-4cda-8908-47721F74B3DC}" border="0" />keepAlive: var</a>, 
					<table border="0" cellspacing="0" cellpadding="0" class="Table" style="padding: 4px 18px;">
						<tr id="param{4CAC8D6D-F6C7-4cda-8908-47721F74B3DC}00" style="display: none;">
							<td width="50"><strong>Default:</strong></td>
							<td></td>
						</tr>
						<tr id="param{4CAC8D6D-F6C7-4cda-8908-47721F74B3DC}01" style="display: none;">
							<td width="50"><strong>Kind:</strong></td>
							<td>in</td>
						</tr>
						<tr id="param{4CAC8D6D-F6C7-4cda-8908-47721F74B3DC}02" style="display: none;">
							<td width="50"><strong>Stereotype: </strong></td>
							<td></td>
						</tr>
						<tr id="param{4CAC8D6D-F6C7-4cda-8908-47721F74B3DC}03" style="display: none;">
							<td width="50"></td>
							<td><div class="ObjectDetailsNotes">Boolean que define si la sesion debe mantenerse abierta por medio de una cookie.</div>
</td>
						</tr>
					</table>
					<a href="#" onclick="parent.toggleData('param{971C1B8C-3208-426f-9624-6ABB9612B0A1}')" style="text-decoration: none; color: #000000;"><img src="../images/plus03.gif" align="absmiddle" id="param{971C1B8C-3208-426f-9624-6ABB9612B0A1}" border="0" />password: var</a>, 
					<table border="0" cellspacing="0" cellpadding="0" class="Table" style="padding: 4px 18px;">
						<tr id="param{971C1B8C-3208-426f-9624-6ABB9612B0A1}00" style="display: none;">
							<td width="50"><strong>Default:</strong></td>
							<td></td>
						</tr>
						<tr id="param{971C1B8C-3208-426f-9624-6ABB9612B0A1}01" style="display: none;">
							<td width="50"><strong>Kind:</strong></td>
							<td>in</td>
						</tr>
						<tr id="param{971C1B8C-3208-426f-9624-6ABB9612B0A1}02" style="display: none;">
							<td width="50"><strong>Stereotype: </strong></td>
							<td></td>
						</tr>
						<tr id="param{971C1B8C-3208-426f-9624-6ABB9612B0A1}03" style="display: none;">
							<td width="50"></td>
							<td><div class="ObjectDetailsNotes">Password del usuario que desea iniciar sesion.<br /><br />(Encriptado con MD5)</div>
</td>
						</tr>
					</table>
					<a href="#" onclick="parent.toggleData('param{95BB68C9-ADAF-481c-8AA3-A5DB0D20E510}')" style="text-decoration: none; color: #000000;"><img src="../images/plus03.gif" align="absmiddle" id="param{95BB68C9-ADAF-481c-8AA3-A5DB0D20E510}" border="0" />username: var</a>, 
					<table border="0" cellspacing="0" cellpadding="0" class="Table" style="padding: 4px 18px;">
						<tr id="param{95BB68C9-ADAF-481c-8AA3-A5DB0D20E510}00" style="display: none;">
							<td width="50"><strong>Default:</strong></td>
							<td></td>
						</tr>
						<tr id="param{95BB68C9-ADAF-481c-8AA3-A5DB0D20E510}01" style="display: none;">
							<td width="50"><strong>Kind:</strong></td>
							<td>in</td>
						</tr>
						<tr id="param{95BB68C9-ADAF-481c-8AA3-A5DB0D20E510}02" style="display: none;">
							<td width="50"><strong>Stereotype: </strong></td>
							<td></td>
						</tr>
						<tr id="param{95BB68C9-ADAF-481c-8AA3-A5DB0D20E510}03" style="display: none;">
							<td width="50"></td>
							<td><div class="ObjectDetailsNotes">Nombre del usuario que desea iniciar sesion</div>
</td>
						</tr>
					</table>
):var
				</td>
			</tr>
			<tr>
				<td class="TableRowBottomDashed"  colspan="1">
					<div class="DetailsDivParent"><img src="../images/minus03.gif" align="absmiddle" id="DetailsImageOperations17" onclick="parent.toggleDiv('detailsDIVOperations17','DetailsImageOperations17')" />Details:
						<div id="detailsDIVOperations17" class="DetailsDiv" >
					<i>Sequential  </i>
					<table>
						<tr>
							<td valign = "top"><i></i><span style="margin-left: .7cm;"> </span></td>
							<td></td>
						</tr>
					</table>
					<div class="ObjectDetailsNotes"><table>
	<tr>
		<td valign="top">
			<i>Notes: </i><span style="margin-left: .4cm;"> </span>
		</td>
		<td>
			&lt;font color=&quot;#000000&quot;&gt;Permite a un usuario registrado iniciar sesion con la aplicacion.&lt;/font&gt;&lt;br /&gt;&lt;br /&gt;Registrar los datos del usuario que desea iniciar sesion (llamando a otro metodo?)&lt;br /&gt;Traer los datos del usuario (Session_Model)&lt;br /&gt;Comparar usuario / password&lt;br /&gt;&lt;br /&gt;Si la comprobacion falla&lt;br /&gt;&nbsp;<WBR>&nbsp;<WBR>&nbsp;<WBR> Redirigir a pantalla de login indicando codigo de error&lt;br /&gt;&nbsp;<WBR>&nbsp;<WBR>&nbsp;<WBR> retornar False&lt;br /&gt;Sino&lt;br /&gt;&nbsp;<WBR>&nbsp;<WBR>&nbsp;<WBR> Cargar los datos del usuario en el Controlador&lt;br /&gt;&nbsp;<WBR>&nbsp;<WBR>&nbsp;<WBR> retornar True&lt;br /&gt;
		</td>
	</tr>
</table></div>
						
						</div>
					</div>
				</td>
			</tr>

		</table>
</div>		<div class="ItemBody" id="LinksTable">
			<table align="center" border="0" cellspacing="0" cellpadding="0" class="Table">
				<tr>
					<td width="30%" class="TableHeading">Object</td>
					<td width="15%" class="TableHeading">Type</td>
					<td width="15%" class="TableHeading">Connection</td>
					<td width="40%" class="TableHeading">Notes</td>
				</tr>
				<tr>
					<td width="30%" class="TableRow" valign="top"><a href="EA3.htm">Controller</a></td>
					<td width="15%" class="TableRow" valign="top">Class</td>
					<td width="15%" class="TableRow" valign="top">Generalization</td>
					<td width="40%" class="TableRow" valign="top">&nbsp;</td>
				</tr>

			</table>
		</div>
	</div>
<div class="pageFooter"></div>
 
</body>
</html>